﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace dotUML.Core.Common.SequenceDiagram
{
    /// <summary>
    /// Class for a UML lifeline element.
    /// </summary>
    class Lifeline : DiagramElement, ILifeline
    {
        ELifelineType _lifelineType;
        List<IStereotype> _stereotypes;
        string _dataType;

        /// <summary>
        /// Class constructor.
        /// </summary>
        /// <param name="Name"></param>
        /// <param name="LifelineType"></param>
        public Lifeline(string Name, ELifelineType LifelineType)
        {
            this.Name = Name;
            this.LifelineType = LifelineType;
            _stereotypes = new List<IStereotype>();
        }

        #region ILifeline Members

        /// <summary>
        /// Type of lifeline.
        /// </summary>
        public ELifelineType LifelineType
        {
            get
            {
                return _lifelineType;
            }
            set
            {
                _lifelineType = value;
            }
        }

        /// <summary>
        /// Lifeline's stereotypes.
        /// </summary>
        public List<IStereotype> Stereotypes
        {
            get
            {
                return _stereotypes;
            }
            set
            {
                _stereotypes = value;
            }
        }

        /// <summary>
        /// Lifeline's datatype.
        /// </summary>
        public string DataType
        {
            get
            {
                return _dataType;
            }
            set
            {
                _dataType = value;
            }
        }

        #endregion
    }
}
